import 'package:flutter/material.dart';

class MyApp8 extends StatelessWidget {
  const MyApp8({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        //1.导航
        appBar: AppBar(
          title: const Text('Column组件'),
          backgroundColor: Colors.pink,
        ),
        //2.内容
        body: Center(
          child: Container(
            width: 300,
            height: 400,
            //背景颜色
            color: Colors.yellow,
            child: Column(
              //主轴对齐
              mainAxisAlignment: MainAxisAlignment.center,
              //侧轴对齐
              crossAxisAlignment: CrossAxisAlignment.center,
              children: [
                const SizedBox(height: 10),
                Image.network(
                    'https://yanxuan-item.nosdn.127.net/afd6199278a5b8fd783bc4947960fabc.jpg',
                    width: 86),
                //外边距
                const SizedBox(height: 10),
                const Text('茶水分离杯耐热隔热玻璃杯'),
                const Text('￥199.00')
              ],
            ),
          ),
        ));
  }
}

class ColumnAndRowCaseItem extends StatelessWidget {
  const ColumnAndRowCaseItem({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      width: 70,
      height: 70,
      margin: EdgeInsets.only(left: 10),
      child: Container(
        width: double.infinity,
        height: double.infinity,
        decoration: BoxDecoration(
          borderRadius: BorderRadius.circular(35),
          color: Colors.blue,
        ),
      ),
    );
  }
}
